<%@ page import="controllers.SolutionConnect" %>
<%@ page import="utils.UsersInfo" %>
<%@ page import="java.util.List, java.util.HashMap" %>
<%@ page import = "java.util.Date" %>
<%@ page import="com.google.appengine.api.blobstore.BlobInfo, com.google.appengine.api.blobstore.BlobInfoFactory, com.google.appengine.api.blobstore.BlobKey" %>
<%@ page import="com.google.appengine.api.blobstore.BlobstoreService, com.google.appengine.api.blobstore.BlobstoreServiceFactory, com.google.appengine.api.datastore.DatastoreServiceFactory" %>  



<%
	String clSolID = (String) request.getAttribute("sol_id");
	if ( clSolID == null ) clSolID =  request.getParameter("sol_id");		
	if ( clSolID == null )
		response.sendRedirect("/home.jsp");	

	Long cllSolID = Long.parseLong( clSolID );
	
	String clUserEmail = (String) pageContext.getAttribute("USER_EMAILID", PageContext.PAGE_SCOPE);
	SolutionConnect clSOL = new SolutionConnect();
	List<HashMap<String,Object>> clRS = clSOL.getQuery("solID", cllSolID);
	if ( clRS == null )
		response.sendRedirect("/home.jsp");		

	String	clteamLead = (String) clRS.get(0).get("teamLead");
	String	clteamMembers = (String) clRS.get(0).get("teamMembers");
	String	clotherTeamMembers = (String) clRS.get(0).get("otherTeamMembers");
	BlobKey	clteamPicKey = (BlobKey) clRS.get(0).get("teamPicKey");
	
	String teamLeadFull = UsersInfo.getFullName(clteamLead);
	String teamMembersFull = UsersInfo.getMultiFullName(clteamMembers);
	String othersteamMembersFull = UsersInfo.getMultiFullName(clotherTeamMembers);
	
%>

<!-- colLeft -->
<div id="lotusColLeft">
<!--  <script type="text/javascript" src="/js/semanticTagService.js?loadCssFiles=false"></script>-->
<div class="module">
	<div class="tl">
		<div class="tr">
			<div class="bl">
				<div class="br">
		<p><font style="font-size:16px; font-weight:bold">Team Information </font></p>			
					<div class="sidebar pad10"><table cellspacing="0" cellpadding="1" border="0" width="100%">
	<tbody>
<!-- Photo upload-->
		<tr class="h-edit-bg">
			<td colspan="3">
				<img height="1" border="0" width="1" src="/img/transparent.gif"/>
			</td>
		</tr>
		<tr class="h-edit-bg" valign="top">
<td width="40%" class="h-fieldEdit-text" valign="top">
           	
				<% if (clteamPicKey != null && !clteamPicKey.getKeyString().equals("")) { %>
		           	&nbsp; <img  src='/blobserve?blob-key=<% out.println( clteamPicKey.getKeyString() ); %>' width='100px' height='100px' id="photoimg" />
 				<%} else { %>
 						&nbsp;<img  src="/img/Team1.gif" width='100px' height='100px'  id="photoimg"/>
				<% } %> 						
           	
</td> </tr>
<!-- end Photo upload-->
<tr class="h-edit-bg">
			<td height="8" width="3%" colspan="3">
				<img height="4" border="0" width="1" src="/img/transparent.gif"/>
			</td>
		</tr>
<tr><td class="h-fieldHeaderEdit-bgtext"><span class="Red10">*</span><span class="frm-label">Solution Team Lead:</span></td></tr>
	<!--		<tr><td  class="h-fieldEdit-text" valign="top">Xiao Mu Jiang </td></tr> -->
<!-- buisness card code -->
<tr><td class="h-fieldEdit-text" valign="top"> <%= teamLeadFull %>  </td></tr>
<tr><td></td></tr>
<tr class="h-edit-bg">
			<td height="8" width="3%" colspan="3">
				<img height="4" border="0" width="1" src="/img/transparent.gif"/>
			</td>
		</tr>
	<tr><td class="h-fieldHeaderEdit-bgtext"><span class="Red10"> </span><span class="frm-label">Team Members:</span></td></tr>
	<!--		<tr><td class="h-fieldEdit-text" valign="top">Bing Hui Zhao, Hong Shang, Hong Zhen Yu, Liang Chen, Shu Peng Yang, Sow Yong Chai, Takanobu Kanazawa, Xiao Fei Tang, Xiao Mu Jiang, Xiao Yan Qiu, Xing Qiong Luo, Xue Xiong Wang, Yu Xiang Wei, Yun Bao Ma, Zuo Yan Xu </td></tr>  -->
<!-- Team Member Business Card -->
<tr><td class="h-fieldEdit-text" valign="top">  

<%=teamMembersFull%>


</td></tr>
<tr><td></td></tr>	
<tr class="h-edit-bg">
			<td height="8" width="3%" colspan="3">
				<img height="4" border="0" width="1" src="/img/transparent.gif"/>
			</td>	</tr>
		<tr>		<td class="h-fieldHeaderEdit-bgtext"><span class="Red10"></span> <span class="frm-label">Other Team Members:</span></td></tr>
		<td width="30%" class="h-fieldEdit-text" valign="top"> <%=othersteamMembersFull %></td>
<!-- 
<tr><td class="h-fieldEdit-text" valign="top"> 
</td>		</tr>
-->
		<tr class="h-edit-bg">
			<td height="8" width="3%" colspan="3">
				<img height="4" border="0" width="1" src="/img/transparent.gif"/>
			</td>
		</tr>
		<tr class="h-edit-bg">
			<td height="8" width="3%" colspan="3">
				<img height="4" border="0" width="1" src="/img/transparent.gif"/>
			</td>
		</tr>
		<tr class="h-edit-bg">
			<td height="8" width="3%" colspan="3">
				<img height="4" border="0" width="1" src="/img/transparent.gif"/>
			</td>
		</tr>
	</tbody>
</table>				</div>
				</div>
				
			</div>
		</div>
	</div>
	</div>
</div>
<!--end colLeft-->
